client_max_body_size 64m;

location ^~ /moodle/ {
    fastcgi_split_path_info ^(.+\.php)(.*)$;
    fastcgi_index index.php;
    fastcgi_pass {{ fastcgi_pass }};
    include /etc/nginx/fastcgi_params;
    fastcgi_param PATH_INFO $fastcgi_path_info;
    # moodle should be install in /opt/moodle
    fastcgi_param  SCRIPT_FILENAME /opt$fastcgi_script_name;
    fastcgi_connect_timeout 60s;
    fastcgi_read_timeout 120s; #保证php-fpm有足够的时间来执行数据库操作
}

